<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico" th:href="@{images/favicon.ico}">
    <title>健身商城</title>
    <!-- Reset CSS -->
    <link href="css/reset.css" th:href="@{css/reset.css}" rel="stylesheet" type="text/css">
    <!-- Bootstrap -->
    <link href="assets/bootstrap/css/bootstrap.min.css" th:href="@{assets/bootstrap/css/bootstrap.min.css}" rel="stylesheet" type="text/css">
    <!-- Font Awesome -->
    <link href="assets/font-awesome/css/font-awesome.min.css" th:href="@{assets/font-awesome/css/font-awesome.min.css}" rel="stylesheet" type="text/css">
    <!-- Iconmoon -->
    <link href="assets/iconmoon/css/iconmoon.css" th:href="@{assets/iconmoon/css/iconmoon.css}" rel="stylesheet" type="text/css">
    <!-- Lightbox CSS -->
    <link href="assets/lightbox/css/lightbox.css" th:href="@{assets/lightbox/css/lightbox.css}" rel="stylesheet" type="text/css">
    <!-- Owl Carousel -->
    <link href="assets/owl-carousel/css/owl.carousel.min.css" th:href="@{assets/owl-carousel/css/owl.carousel.min.css}" rel="stylesheet" type="text/css">
    <!-- Animate -->
    <link href="css/animate.css" th:href="@{css/animate.css}" rel="stylesheet" type="text/css">
    <!-- Aos -->
    <link href="assets/aos/aos.css" th:href="@{assets/aos/aos.css}" rel="stylesheet" type="text/css">
    <!-- Custom Style -->
    <link href="css/custom.css" th:href="@{css/custom.css}" rel="stylesheet" type="text/css">
</head>
<body>
<header>
    <div class="container header-sec">
        <div class="row">
            <span class="col-xs-12 col-sm-3 logo"><a href="javascript:;"><img src="images/logo.png" class="main img-responsive" alt="Fitness Gym"><img src="images/logo-fix.png" class="fix img-responsive" alt="Fitness Gym"></a></span>
            <div class="col-xs-12 col-sm-9 header-right">
                <div class="header_search_outer">
                    <span class="icon-search-icon"></span>
                    <input type="text" value="" placeholder="Search" class="header_search"/>
                </div>
                <nav class="navbar navbar-expand-md navbar-dark navbar-custom">
                    <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown">
                        <span class="navbar-toggler-icon"></span>
                    </button>
                    <div class="collapse navbar-collapse" id="navbarNavDropdown">
                        <ul class="navbar-nav">
                            <li class="nav-item active" id="oneLi">
                                <a class="nav-link" href="javascript:choose(1);">所有课程</a>
                            </li>
                            <li class="nav-item "  id="twoLi">
                                <a class="nav-link" href="javascript:choose(2);">特色课程</a>
                            </li>
                            <li class="nav-item" id="threeLi">
                                <a class="nav-link" href="javascript:choose(3);">增肌课程</a>
                            </li>
                            <li class="nav-item" id="fourLi">
                                <a class="nav-link" href="javascript:choose(4);">减脂课程</a>
                            </li>
                            <li class="nav-item" id="fiveLi">
                                <a class="nav-link" href="javascript:choose(5);">康复课程</a>
                            </li>
                        </ul>
                    </div>
                </nav>
            </div>
        </div>
    </div>
</header>
<!-- End Header -->



<!-- Start Finess Sec -->
<div class="finess-outer" style="background: url(images/classes-banner.png) no-repeat center top / cover;height: 300px;">
    <div class="container"style="margin-top: 40px;">
        <h3>今年夏天进行的健身课 <br/>立即 付款<br/> 将得到 <span>25%</span> 的折扣</h3>
    </div>
</div>
<!-- End Finess sec -->

<!-- Start Feature Classes -->
<div class="feature-outer classes-page">
    <div class="container" id="oneContainer">
        <div class="feature-list">
            <div class="row">
                <div class="col-sm-4 col-xs-12" th:each="sCourse :${session.allCourse}">
                    <a href="javascript:;" th:onclick= "|javascript:getCourseInfo('${sCourse.cid}')|" data-toggle="modal" data-target="#myModal">
                    <div class="feature-box">
                        <figure>
                            <img src="images/feature-thumb1.png"  th:src="@{images/{sample}(sample=${sCourse.sample})}" width="350px" height="239.167px">
                            <div class="time-box">
                                <span class="date"><span th:text="${sCourse.mold}">16 DEC</span></span>
                                <span class="time"><span th:text="${sCourse.schooltime}">6:30 AM</span></span>
                            </div>
                        </figure>
                    </div>
                </a>
                </div>
            </div>
        </div>

    </div>

    <div class="container" id="twoContainer">
        <div class="feature-list">
            <div class="row">
                <div class="col-sm-4 col-xs-12" th:each="sCourse :${session.allCourse}" th:if="${sCourse.mold == '特色课'}">
                    <a href="javascript:;" th:onclick= "|javascript:getCourseInfo('${sCourse.cid}')|" data-toggle="modal" data-target="#myModal">
                        <div class="feature-box">
                            <figure>
                                <img src="images/feature-thumb1.png"  th:src="@{images/{sample}(sample=${sCourse.sample})}" width="350px" height="239.167px">
                                <div class="time-box">
                                    <span class="date"><span th:text="${sCourse.cname}">16 DEC</span></span>
                                    <span class="time"><span th:text="${sCourse.schooltime}">6:30 AM</span></span>
                                </div>
                            </figure>
                        </div>
                    </a>
                </div>
            </div>
        </div>
    </div>
    <div class="container" id="threeContainer">
        <div class="feature-list">
            <div class="row">
                <div class="col-sm-4 col-xs-12" th:each="sCourse :${session.allCourse}" th:if="${sCourse.mold == '增肌课'}">
                    <a href="javascript:;" th:onclick= "|javascript:getCourseInfo('${sCourse.cid}')|" data-toggle="modal" data-target="#myModal">
                        <div class="feature-box">
                            <figure>
                                <img src="images/feature-thumb1.png"  th:src="@{images/{sample}(sample=${sCourse.sample})}" width="350px" height="239.167px">
                                <div class="time-box">
                                    <span class="date"><span th:text="${sCourse.cname}">16 DEC</span></span>
                                    <span class="time"><span th:text="${sCourse.schooltime}">6:30 AM</span></span>
                                </div>
                            </figure>
                        </div>
                    </a>
                </div>
            </div>
        </div>
    </div>
    <div class="container" id="fourContainer">
        <div class="feature-list">
            <div class="row">
                <div class="col-sm-4 col-xs-12" th:each="sCourse :${session.allCourse}" th:if="${sCourse.mold == '减脂课'}">
                    <a href="javascript:;" th:onclick= "|javascript:getCourseInfo('${sCourse.cid}')|" data-toggle="modal" data-target="#myModal">
                        <div class="feature-box">
                            <figure>
                                <img src="images/feature-thumb1.png"  th:src="@{images/{sample}(sample=${sCourse.sample})}" width="350px" height="239.167px">
                                <div class="time-box">
                                    <span class="date"><span th:text="${sCourse.cname}">16 DEC</span></span>
                                    <span class="time"><span th:text="${sCourse.schooltime}">6:30 AM</span></span>
                                </div>
                            </figure>
                        </div>
                    </a>
                </div>
            </div>
        </div>
    </div>
    <div class="container" id="fiveContainer">
        <div class="feature-list">
            <div class="row">
                <div class="col-sm-4 col-xs-12" th:each="sCourse :${session.allCourse}" th:if="${sCourse.mold == '康复课'}">
                    <a href="javascript:;" th:onclick= "|javascript:getCourseInfo('${sCourse.cid}')|" data-toggle="modal" data-target="#myModal">
                        <div class="feature-box">
                            <figure>
                                <img src="images/feature-thumb1.png"  th:src="@{images/{sample}(sample=${sCourse.sample})}" width="350px" height="239.167px">
                                <div class="time-box">
                                    <span class="date"><span th:text="${sCourse.cname}">16 DEC</span></span>
                                    <span class="time"><span th:text="${sCourse.schooltime}">6:30 AM</span></span>
                                </div>
                            </figure>
                        </div>
                    </a>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- End Feature sec -->
<!-- Modal 用于获取资料并显示-->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" style="z-index: 9999;">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="myModalLabel">请确认您的购买信息</h4>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            </div>
            <div class="modal-body">
                <div class="container">
                    <div class="row">
                        <div class="col-sm-6 ">
                            <input type="hidden" id="courseId">
                            <input type="hidden" id="userId" th:value="${session.nowUser.uid}">
                            <img src="images/feature-thumb8.png" width="100%" height="70%" id="samplePicture"/>
                            <p>&nbsp;</p>
                            <label>
                                总价
                                <input type="text" style="border: none;width: 30%;text-align: center;color: #2D8CF0;" value="200" id="totalCoursePrice" readonly="readonly" />
                                <input type="hidden" value="200" id="coursePrice" />
                                元
                            </label>
                        </div>
                        <div class="col-sm-6 ">
                            <p>课程名称:&nbsp;&nbsp;&nbsp;&nbsp;<span id="courseName" style="color: #009688;">有氧操课</span></p>
                            <p>教练名称:&nbsp;&nbsp;&nbsp;&nbsp;<span id="courseTeacher" style="color: #009688;">王可可</span></p>
                            <p>训练地区:&nbsp;&nbsp;&nbsp;&nbsp;<span id="courseVenue" style="color: #009688;">王可可</span></p>
                            <p>课程关注度&nbsp;&nbsp;第&nbsp;<span id="courseHot" style="color: #009688;">1</span>&nbsp;名</p>
                            <p>课程喜爱度&nbsp;&nbsp;第&nbsp;<span id="courseLike" style="color: #009688;">1</span>&nbsp;名</p>
                            <p>&nbsp;</p>
                            <label style="margin-top: 14px;">
                                <span>课时数：</span>
                                <button onclick="add()">+</button>
                                <input type="text" style="border: none;width: 30%;text-align: center;color: #2D8CF0;" value="1" id="courseNum"/>
                                <button onclick="sub()">-</button>
                            </label>
                        </div>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" id="buyCourses">确认购买</button>
            </div>
        </div>
    </div>
</div>
<style>
    /**
 * 注册提示框样式
 */
    #info{
        display: none;
        width: 200px;
        height: 200px;
        background-color: #000000;
        border-radius: 30px;
        margin: 150px auto;
        opacity:0.7;
        color: white;
        position:fixed;
        top:20%;
        left:30%;
        z-index: 100000;
    }
    #info p{
        text-align: center;
        font-size: 18px;
        padding: 10px;
    }
</style>
<div id="info">
    <span id="msg"></span>
</div>

</body>
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="js/jquery.min.js" th:src="@{js/jquery.min.js}"></script>
    <!-- Bootstrap JS -->
    <script src="assets/bootstrap/js/bootstrap.min.js" th:src="@{assets/bootstrap/js/bootstrap.min.js}"></script>
    <!-- Lightbox JS -->
    <script src="assets/lightbox/js/lightbox.js" th:src="@{assets/lightbox/js/lightbox.js}"></script>
    <!-- Owl Carousal JS -->
    <script src="assets/isotope/js/isotope.min.js" th:src="@{assets/isotope/js/isotope.min.js}"></script>
    <!-- Owl Carousal JS -->
    <script src="assets/owl-carousel/js/owl.carousel.min.js" th:src="@{assets/owl-carousel/js/owl.carousel.min.js}"></script>
    <!-- Aos JS -->
    <script src="assets/aos/aos.js" th:src="@{assets/aos/aos.js}"></script>
    <!-- CounterUp JS -->
    <script src="assets/counterup/counterup.min.js" th:src="@{assets/counterup/counterup.min.js}"></script>
    <script src="assets/counterup/waypoints.min.js" th:src="@{assets/counterup/waypoints.min.js}"></script>
    <!-- Custom JS -->
    <script src="js/custom.js" th:src="@{js/custom.js}"></script>
    <script th:src="@{js/member-course.js}"></script>
</html>